﻿@{
    Layout = "~/Views/Shared/_TestLayout.cshtml";
}
@section headSec{
    <style type="text/css">
        .textstyle1 {
            color: Red;
            font-weight: bold;
        }

        .textstyle2 {
            color: Green;
            font-weight: bold;
        }
    </style>

    <script type="text/javascript">
        $(document).ready(function() {
            //上传
            $('form').submit(function () {
                $(this).ajaxSubmit({
                    type: 'post',
                    url: location.href,
                    dataType: 'json',
                    success: function (data) {
                        if (data.result.errcode == 0) {
                            alert("生成FORM成功");
                            location.reload();
                        } else {
                            alert("生成FORM失败");
                        }
                    }
                })
                return false;
            })
        });
    </script>
}
    <form>
        <div style="padding:10px;">
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><input name="fname" style="width:40%;" /><input name="ftype" style="width:40%;" /></p>
            <p><button id="btn" type="submit">生成FORM</button></p> @Html.AntiForgeryToken()
        </div>
    </form>
